window.onload=function(){ 
/*
var myImg = new Array();
myImg[0] = "img/img-news.png";
myImg[1] = "img/1.png";
myImg[2] = "img/2.png";
myImg[3] = "img/3.png";
var c = 0;
imgLoad();
function imgLoad(){
	if(c == 0){
		document.getElementById("js-load").src = myImg[0] ;
		document.getElementById("radio-0").src = "img/img-news-active.png" ;
		document.getElementById("radio-3").src = "img/img-news-silver.png" ;
		c++;
	}else if(c == 1){
		document.getElementById("js-load").src = myImg[1] ;
		document.getElementById("radio-1").src = "img/img-news-active.png" 
		document.getElementById("radio-0").src = "img/img-news-silver.png" ;
		c++;
	}
	else if(c == 2){
		document.getElementById("js-load").src = myImg[2] ;
		document.getElementById("radio-2").src = "img/img-news-active.png" ;
		document.getElementById("radio-1").src = "img/img-news-silver.png" ;
		c++;
	}
	else if(c == 3){
		document.getElementById("js-load").src = myImg[3] ;
		document.getElementById("radio-3").src = "img/img-news-active.png" ;
		document.getElementById("radio-2").src = "img/img-news-silver.png" ;
		c = 0;
	}else{
		
	}	 
}
setInterval(function(){
	imgLoad();
},3000);

var counterB = 0;
banners();
//manner-img
function banners(){
	 //console.log(counterB);
	

	if(counterB == 0){
		document.getElementById("manner-img").src = "img/baner.png" ;
		counterB++;
	}else if(counterB == 1){
		document.getElementById("manner-img").src = "img/banner-2.png" ;
		counterB--;
	}else{
		counerB = 0;
		document.getElementById("manner-img").src = "img/baner.png" ;
		couterB++;
	}
	//console.log(counterB);
}
setInterval(function(){
	banners();
},3000);


*/

/****************************/

var mytest = new Array();
mytest[0] = "img/img-news.png";
mytest[1] = "img/1.png";
mytest[2] = "img/2.png";
mytest[3] = "img/3.png";
var cnt = 0;
couner(cnt);
function couner(){
	//console.log(mytest.length);
	if( cnt >= 0 && cnt < (mytest.length-1)){
		document.getElementById("js-load").src = mytest[cnt] ;
		document.getElementById("radio-"+ cnt).src = "img/img-news-active.png" ;
		if(cnt == 0){
			document.getElementById("radio-" +(mytest.length-1) ).src = "img/img-news-silver.png" ;
		}else{
			document.getElementById("radio-" +(cnt-1) ).src = "img/img-news-silver.png" ;
		}
		cnt++;
	}else if(cnt == (mytest.length-1)){
		document.getElementById("js-load").src = mytest[cnt] ;
		document.getElementById("radio-"+ cnt).src = "img/img-news-active.png" 
		document.getElementById("radio-" +(cnt-1) ).src = "img/img-news-silver.png" ;
		cnt = 0;
	}else{
		cnt = 0;
		document.getElementById("js-load").src = mytest[cnt] ;
	}
}
setInterval(function(){
	couner();
},3000);
}
 